Geo Target Routing Policy
Description
-
Policy provides conditional target routing based on API call geo location or meta data that are passed in HTTP header.
-
The Policy also allows injecting member, application, plan and package/service key attributes as HTTP header(s).
-
Policy only supports pre processing of the user client request.
Usage
-
The following pre-input configuration states the name of header to fetch from incoming request which holds region code meta data.
regioncodeheader:<HTTP header name that holds the API request region code>Example:
regioncodeheader:HTTP-REQUEST-REGION-KEY -
The following pre-input configuration holds the details of region code and hostname association. Region code will be matched with the header value of the header specified for 'regioncodeheader' pre input.
regioncodevalue:{<Code1>:<URI1>, <Code2>:<URI2> ......}Example:
regioncodevalue:{"SG": "https://api-sg.acme.com/api/v1","CN": "https://api-sg.acme.com/api/v1", "NL": "https://api-emea.acme.com/api/v1"If the incoming header in the request
'HTTP-REQUEST-REGION-KEY'has the value 'SG', the configuration will be routed to 'SG', the configured host'api-sg.gta.com/api/v1'. -
The following pre-input configuration holds the default target URI which is used for target routing in case when
regioncodeheaderis not present in the request or coming with an empty value.targetdefaulturi:<Contains the default target URI>Example:
targetdefaulturi: https://uki.acme-travel.com/api/v1